import request from "@/utils/request.ts";

// 文章列表
export function article() {
  return request({
    url: "/profile ",
    method: "get"
  });
}
// 请求数据data/main
export function getData(url:string,params?:{page_no: number, page_size: number }) {
  return request({
    url: url,
    method: "get",
    params
  });
}
// 首页折线统计图
export function search(params:{name:string,type:string,time:number}) {
  return request({
    url: "/data/search",
    method: "get",
    params
  });
}
// /history/num
export function historys(params:any) {
  return request({
    url: "/profile",
    method: "get",
    params
  });
}
// 数据中心
// /alarm/search
export function police(params:any) {
  return request({
    url: "/alarm/search",
    method: "get",
    params
  });
}
// 商城 修改
export function updaleGlodMany(data:any) {
  return request({
    url: "/shop/update",
    method: "post",
    data,
  });
}
// 新增商城
export function addGlodMany(data:string) {
  return request({
    url: "/shop/create",
    method: "post",
    data,
  });
}
// 删除商城
export function deleteGlodMany(data:string) {
  return request({
    url: "/shop/delete",
    method: "post",
    data,
  });
}
// 设置修改
export function setUpdate(data:string) {
  return request({
    url: "/set/update",
    method: "post",
    data,
  });
}
// 设置胜率state.updateData
export function setRate(data:string) {
  return request({
    url: "/gm/setrate",
    method: "post",
    data,
  });
}
// /gm/addmoney  给用户加钱
export function AddMoney(data:string) {
  return request({
    url: "/gm/addmoney",
    method: "post",
    data,
  });
}


